package com.shy.controller;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.shy.model.User;

@RestController
public class TestController {
	@RequestMapping("/login")
	public String login(@RequestBody User user) {
		if (user.getUsername().equals("admin") && user.getPassword().equals("123")) {
			return "登录成功";
		}
		return "登录失败";
	}
}
